import vue from "vue"
import Router from "vue-router"

vue.use(Router)

const router = new Router({
    mode: "history", // require service support
    scrollBehavior: () => ({
        y: 0
    }),
    routes: [
        {
            path: "/barChart",
            component: () => import("@/views/barChart/index"),
            meta: {
                title: "柱状图"
            }
        },
        {
            path: "/scatterBar",
            component: () => import("@/views/scatterBar/index"),
            meta: {
                title: "柱状图"
            }
        },
        {
            path: "/lineChart",
            component: () => import("@/views/lineChart/index"),
            meta: {
                title: "折线图"
            }
        },
        {
            path: "/transition",
            component: () => import("@/views/transition/index"),
            meta: {
                title: "过渡和动画"
            }
        },
        {
            path: "/drag",
            component: () => import("@/views/drag/index"),
            meta: {
                title: "拖拽交互"
            }
        },
        {
            path: "/pieChart",
            component: () => import("@/views/pieChart/index"),
            meta: {
                title: "拖拽交互"
            }
        },
        {
            path: "/force",
            component: () => import("@/views/force/index"),
            meta: {
                title: "力导向图"
            }
        },
        {
            path: "/radar",
            component: () => import("@/views/radar/index"),
            meta: {
                title: "雷达图"
            }
        },
        {
            path: "/chord",
            component: () => import("@/views/chord/index"),
            meta: {
                title: "弦图"
            }
        },
        {
            path: "/tree",
            component: () => import("@/views/tree/index"),
            meta: {
                title: "树状图"
            }
        },
        {
            path: "/cluster",
            component: () => import("@/views/cluster/index"),
            meta: {
                title: "集群图"
            }
        },
        {
            path: "/bundle",
            component: () => import("@/views/bundle/index"),
            meta: {
                title: "捆图"
            }
        },
        {
            path: "/pack",
            component: () => import("@/views/pack/index"),
            meta: {
                title: "打包图"
            }
        },
        {
            path: "/histogram",
            component: () => import("@/views/histogram/index"),
            meta: {
                title: "直方图"
            }
        },
        {
            path: "/demo",
            component: () => import("@/views/demo/index"),
            meta: {
                title: "demo图"
            }
        },
        {
            path: "/test",
            component: () => import("@/views/test/index"),
            meta: {
                title: "测试"
            }
        },
        {
            path: "/gauge",
            component: () => import("@/views/gauge/index"),
            meta: {
                title: "仪表盘"
            }
        },
        {
            path: "/dynamic",
            component: () => import("@/views/dynamic/index"),
            meta: {
                title: "高新区数据中台需要用到的图表"
            }
        },
        {
            path: "/lenovo",
            component: () => import("@/views/lenovo/index"),
            meta: {
                title: "联想公司要用图"
            }
        }
    ]
})

export default router
